﻿namespace NRank.Examples
{
	public class SimpleObject /*: IRanked<string>*/
	{
		public SimpleObject(string o, double rank)
		{
			Name = o;
			Rank = rank;
		}

		public int CompareTo(IRanked<string> other)
		{
			return this.Name.CompareTo(other.Object);
		}

		/*public int CompareTo(object obj)
		{
			return CompareTo(obj as SimpleObject);
		}*/

		public string Name { get; private set; }

		public double Rank { get; private set; }

		public override string ToString()
		{
			return string.Format("{0} ({1})", Name, Rank);
		}
	}
}